package cn.ad.server.web.spring.service.actions.command;

import cn.ad.server.web.spring.model.AdRequest;
import cn.ad.server.web.spring.model.ITransmitInfo;

/**
 * 激活回调请求bean
 * @author wangwei
 *
 */
@Deprecated
public class AdCallBackRequest extends AdRequest implements ITransmitInfo{

	
	/**
	 * 用户设备信息（user_agent）
	 */
	private String ua;
	
	/**
	 * 用户IP地址
	 */
	private String ip;
	
	/**
	 * 设备-os
	 */
	private String os;
	/**
	 * 设备-mac
	 */
	private String mac;
	/**
	 * 设备-mac_md5
	 */
	private String mac_md5;
	/**
	 * 设备-idfa
	 */
	private String idfa;
	/**
	 * 设备-idfa_md5
	 */
	private String idfa_md5;
	/**
	 * 设备-imei
	 */
	private String imei;
	/**
	 * 设备-imei_md5
	 */
	private String imei_md5;
	/**
	 * 设备-androidid
	 */
	private String androidid;
	/**
	 * 设备-androidid_md5
	 */
	private String androidid_md5;
	/**
	 * 渠道id
	 */
	private String ch;//channel
	/**
	 * 广告位id
	 */
	private String aid;
	/**
	 * 策略id
	 */
	private String sid;
	/**
	 * 创意id
	 */
	private String cid;
	/**
	 * 素材id
	 */
	private String mid;
	/**
	 * guid
	 */
	private String guid;
	

	public String getOs() {
		return os;
	}
	public void setOs(String os) {
		this.os = os;
	}
	public String getMac() {
		return mac;
	}
	public void setMac(String mac) {
		this.mac = mac;
	}
	public String getMac_md5() {
		return mac_md5;
	}
	public void setMac_md5(String mac_md5) {
		this.mac_md5 = mac_md5;
	}
	public String getIdfa() {
		return idfa;
	}
	public void setIdfa(String idfa) {
		this.idfa = idfa;
	}
	public String getIdfa_md5() {
		return idfa_md5;
	}
	public void setIdfa_md5(String idfa_md5) {
		this.idfa_md5 = idfa_md5;
	}
	public String getImei() {
		return imei;
	}
	public void setImei(String imei) {
		this.imei = imei;
	}
	public String getImei_md5() {
		return imei_md5;
	}
	public void setImei_md5(String imei_md5) {
		this.imei_md5 = imei_md5;
	}
	public String getAndroidid() {
		return androidid;
	}
	public void setAndroidid(String androidid) {
		this.androidid = androidid;
	}
	public String getAndroidid_md5() {
		return androidid_md5;
	}
	public void setAndroidid_md5(String androidid_md5) {
		this.androidid_md5 = androidid_md5;
	}
	public String getAid() {
		return aid;
	}
	public void setAid(String aid) {
		this.aid = aid;
	}
	public String getSid() {
		return sid;
	}
	public void setSid(String sid) {
		this.sid = sid;
	}
	public String getCid() {
		return cid;
	}
	public void setCid(String cid) {
		this.cid = cid;
	}
	public String getMid() {
		return mid;
	}
	public void setMid(String mid) {
		this.mid = mid;
	}
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	
	public String getCh() {
		return ch;
	}
	public void setCh(String ch) {
		this.ch = ch;
	}
	public String getUa() {
		return ua;
	}
	public void setUa(String ua) {
		this.ua = ua;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	/**
	 * 将设备信息生成url格式
	 * @return
	 */
	public String toUrlDeviceInfo() {
		StringBuilder builder = new StringBuilder();
		builder.append("os=").append(os);
		builder.append("&mac=").append(mac);
		builder.append("&mac_md5=").append(mac_md5);
		builder.append("&idfa=").append(idfa);
		builder.append("&idfa_md5=").append(idfa_md5);
		builder.append("&imei=").append(imei);
		builder.append("&imei_md5=").append(imei_md5);
		builder.append("&androidid=").append(androidid);
		builder.append("&androidid_md5=").append(androidid_md5);
		return builder.toString();
	}
	
	@Override
	public String toString() {
		return "AdCallBackRequest [ua=" + ua + ", ip=" + ip + ", os=" + os + ", mac=" + mac + ", mac_md5=" + mac_md5
				+ ", idfa=" + idfa + ", idfa_md5=" + idfa_md5 + ", imei=" + imei + ", imei_md5=" + imei_md5
				+ ", androidid=" + androidid + ", androidid_md5=" + androidid_md5 + ", ch=" + ch + ", aid=" + aid
				+ ", sid=" + sid + ", cid=" + cid + ", mid=" + mid + ", guid=" + guid + "]";
	}
	
	@Override
	public String getTransmitInfo() {
		return toUrlDeviceInfo();
	}

	
}
